package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.repository;

import com.iwhalecloud.citybrain.flow.platform.manager.application.utils.BeanCopierUtils;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.enums.NextNodeParamEnum;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowNodeReaderVo;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowNodeTempParamDomain;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.repository.FlowNodeReaderRepository;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.repository.FlowNodeTempParamRepository;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowNodeTempParam;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowNodeTempParamExample;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.mapper.FlowNodeReaderDAO;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.mapper.FlowNodeTempParamDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;


@Service
public class FlowNodeReaderRepositoryImpl implements FlowNodeReaderRepository {

    @Autowired
    private FlowNodeReaderDAO flowNodeReaderDAO;


    @Override
    public List<FlowNodeReaderVo> select(String processInstanceId, String nodeCode) {
        return flowNodeReaderDAO.select(processInstanceId,nodeCode );
    }

    @Override
    public void insert(FlowNodeReaderVo flowNodeReaderVo) {
        flowNodeReaderDAO.insert(flowNodeReaderVo);
    }

    @Override
    public void update(Integer id, String targetNodeCode) {
        flowNodeReaderDAO.update(id, targetNodeCode);
    }

    @Override
    public Integer readDoExist(String handlerId, String processInstanceId, String nodeCode) {
        return flowNodeReaderDAO.readDoExist( handlerId,  processInstanceId,  nodeCode);
    }
}
